home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / GXEnvironment.a < prev    next >
Text File  |  1996-05-01  |  8KB  |  359 lines

  1. ;
  2. ;    File:        GXEnvironment.a
  3. ;
  4. ;    Contains:    QuickDraw GX environment constants and interfaces
  5. ;
  6. ;    Version:    Technology:    Quickdraw GX 1.1
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__GXENVIRONMENT__') = 'UNDEFINED' THEN
  19. __GXENVIRONMENT__ SET 1
  20.  
  21.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  22.     include 'ConditionalMacros.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.     IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
  28.     include 'Windows.a'
  29.     ENDIF
  30.     IF &TYPE('__GXTYPES__') = 'UNDEFINED' THEN
  31.     include 'GXTypes.a'
  32.     ENDIF
  33.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  34.     include 'CMApplication.a'
  35.     ENDIF
  36.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  37.  
  38. defaultPollingHandlerFlags        EQU        $00
  39. okToSwitchDuringPollFlag        EQU        $00
  40. dontSwitchDuringPollFlag        EQU        $01
  41. ; typedef long                             gxPollingHandlerFlags
  42.  
  43. ;
  44. ; extern gxPollingHandlerUPP GXGetGraphicsPollingHandler(long *reference)
  45. ;
  46.     IF ¨ GENERATINGCFM THEN
  47.         Macro
  48.         _GXGetGraphicsPollingHandler
  49.             move.w              #$0245,D0
  50.             dc.w                $A832
  51.         EndM
  52.     ELSE
  53.         IMPORT_CFM_FUNCTION GXGetGraphicsPollingHandler
  54.     ENDIF
  55.  
  56. ;
  57. ; extern void GXSetGraphicsPollingHandler(gxPollingHandlerUPP handler, long reference)
  58. ;
  59.     IF ¨ GENERATINGCFM THEN
  60.         Macro
  61.         _GXSetGraphicsPollingHandler
  62.             move.w              #$0246,D0
  63.             dc.w                $A832
  64.         EndM
  65.     ELSE
  66.         IMPORT_CFM_FUNCTION GXSetGraphicsPollingHandler
  67.     ENDIF
  68.  
  69. ;  QD to QD GX Translator typedefs 
  70.  
  71. gxDefaultOptionsTranslation        EQU        $0000
  72. gxOptimizedTranslation            EQU        $0001
  73. gxReplaceLineWidthTranslation    EQU        $0002
  74. gxSimpleScalingTranslation        EQU        $0004
  75. gxSimpleGeometryTranslation        EQU        $0008                ; implies simple scaling 
  76. gxSimpleLinesTranslation        EQU        $000C                ; implies simple geometry & scaling 
  77. gxLayoutTextTranslation            EQU        $0010                ; turn on gxLine layout (normally off) 
  78. gxRasterTargetTranslation        EQU        $0020
  79. gxPostScriptTargetTranslation    EQU        $0040
  80. gxVectorTargetTranslation        EQU        $0080
  81. gxPDDTargetTranslation            EQU        $0100
  82. gxDontConvertPatternsTranslation EQU    $1000
  83. ; typedef long                             gxTranslationOption
  84.  
  85.  
  86. gxContainsFormsBegin            EQU        $0001
  87. gxContainsFormsEnd                EQU        $0002
  88. gxContainsPostScript            EQU        $0004
  89. gxContainsEmptyPostScript        EQU        $0008
  90. ; typedef long                             gxTranslationStatistic
  91.  
  92.  
  93. gxQuickDrawPictTag                EQU        'pict'
  94. gxQuickDrawPict            RECORD 0
  95. ;  translator inputs 
  96. options                     ds.l    1                ; offset: $0 (0)
  97. srcRect                     ds        Rect            ; offset: $4 (4)
  98. styleStretch             ds        Point            ; offset: $C (12)
  99. ;  size of quickdraw picture data 
  100. dataLength                 ds.l    1                ; offset: $10 (16)
  101. ;  file alias 
  102. alias                     ds        gxBitmapDataSourceAlias ; offset: $14 (20)
  103. sizeof                     EQU *                    ; size:   $1E (30)
  104.                         ENDR
  105. ;  WindowRecord utilities 
  106. ;
  107. ; extern gxViewPort GXNewWindowViewPort(WindowRef qdWindow)
  108. ;
  109.     IF ¨ GENERATINGCFM THEN
  110.         Macro
  111.         _GXNewWindowViewPort
  112.             move.w              #$0236,D0
  113.             dc.w                $A832
  114.         EndM
  115.     ELSE
  116.         IMPORT_CFM_FUNCTION GXNewWindowViewPort
  117.     ENDIF
  118.  
  119. ;
  120. ; extern gxViewPort GXGetWindowViewPort(WindowRef qdWindow)
  121. ;
  122.     IF ¨ GENERATINGCFM THEN
  123.         Macro
  124.         _GXGetWindowViewPort
  125.             move.w              #$0237,D0
  126.             dc.w                $A832
  127.         EndM
  128.     ELSE
  129.         IMPORT_CFM_FUNCTION GXGetWindowViewPort
  130.     ENDIF
  131.  
  132. ;
  133. ; extern WindowRef GXGetViewPortWindow(gxViewPort portOrder)
  134. ;
  135.     IF ¨ GENERATINGCFM THEN
  136.         Macro
  137.         _GXGetViewPortWindow
  138.             move.w              #$0238,D0
  139.             dc.w                $A832
  140.         EndM
  141.     ELSE
  142.         IMPORT_CFM_FUNCTION GXGetViewPortWindow
  143.     ENDIF
  144.  
  145. ;  GDevice utilities 
  146. ;
  147. ; extern GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice)
  148. ;
  149.     IF ¨ GENERATINGCFM THEN
  150.         Macro
  151.         _GXGetViewDeviceGDevice
  152.             move.w              #$0239,D0
  153.             dc.w                $A832
  154.         EndM
  155.     ELSE
  156.         IMPORT_CFM_FUNCTION GXGetViewDeviceGDevice
  157.     ENDIF
  158.  
  159. ;
  160. ; extern gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice)
  161. ;
  162.     IF ¨ GENERATINGCFM THEN
  163.         Macro
  164.         _GXGetGDeviceViewDevice
  165.             move.w              #$023A,D0
  166.             dc.w                $A832
  167.         EndM
  168.     ELSE
  169.         IMPORT_CFM_FUNCTION GXGetGDeviceViewDevice
  170.     ENDIF
  171.  
  172. ;  gxPoint utilities 
  173. ;
  174. ; extern void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt)
  175. ;
  176.     IF ¨ GENERATINGCFM THEN
  177.         Macro
  178.         _GXConvertQDPoint
  179.             move.w              #$023B,D0
  180.             dc.w                $A832
  181.         EndM
  182.     ELSE
  183.         IMPORT_CFM_FUNCTION GXConvertQDPoint
  184.     ENDIF
  185.  
  186. ;  printing utilities typedef 
  187. ; typedef gxShapeSpoolProcPtr             gxShapeSpoolFunction
  188.  
  189. ; typedef gxUserViewPortFilterProcPtr     gxUserViewPortFilter
  190.  
  191. ; typedef gxConvertQDFontProcPtr         gxConvertQDFontFunction
  192.  
  193. ;  mouse utilities 
  194. ;  return mouse location in fixed-gxPoint global space 
  195. ;
  196. ; extern void GXGetGlobalMouse(gxPoint *globalPt)
  197. ;
  198.     IF ¨ GENERATINGCFM THEN
  199.         Macro
  200.         _GXGetGlobalMouse
  201.             move.w              #$023C,D0
  202.             dc.w                $A832
  203.         EndM
  204.     ELSE
  205.         IMPORT_CFM_FUNCTION GXGetGlobalMouse
  206.     ENDIF
  207.  
  208. ;  return fixed-gxPoint local mouse (gxViewPort == 0 --> default) 
  209. ;
  210. ; extern void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt)
  211. ;
  212.     IF ¨ GENERATINGCFM THEN
  213.         Macro
  214.         _GXGetViewPortMouse
  215.             move.w              #$023D,D0
  216.             dc.w                $A832
  217.         EndM
  218.     ELSE
  219.         IMPORT_CFM_FUNCTION GXGetViewPortMouse
  220.     ENDIF
  221.  
  222. ;  printing utilities 
  223. ;
  224. ; extern gxUserViewPortFilterUPP GXGetViewPortFilter(gxViewPort portOrder, long *refCon)
  225. ;
  226.     IF ¨ GENERATINGCFM THEN
  227.         Macro
  228.         _GXGetViewPortFilter
  229.             move.w              #$025E,D0
  230.             dc.w                $A832
  231.         EndM
  232.     ELSE
  233.         IMPORT_CFM_FUNCTION GXGetViewPortFilter
  234.     ENDIF
  235.  
  236. ;
  237. ; extern void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilterUPP filter, long refCon)
  238. ;
  239.     IF ¨ GENERATINGCFM THEN
  240.         Macro
  241.         _GXSetViewPortFilter
  242.             move.w              #$023E,D0
  243.             dc.w                $A832
  244.         EndM
  245.     ELSE
  246.         IMPORT_CFM_FUNCTION GXSetViewPortFilter
  247.     ENDIF
  248.  
  249. ;  QD to QD GX Translator functions 
  250. ;
  251. ; extern void GXInstallQDTranslator(GrafPtr port, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStrech, gxShapeSpoolUPP userFunction, void *reference)
  252. ;
  253.     IF ¨ GENERATINGCFM THEN
  254.         Macro
  255.         _GXInstallQDTranslator
  256.             move.w              #$023F,D0
  257.             dc.w                $A832
  258.         EndM
  259.     ELSE
  260.         IMPORT_CFM_FUNCTION GXInstallQDTranslator
  261.     ENDIF
  262.  
  263. ;
  264. ; extern gxTranslationStatistic GXRemoveQDTranslator(GrafPtr port, gxTranslationStatistic *statistic)
  265. ;
  266.     IF ¨ GENERATINGCFM THEN
  267.         Macro
  268.         _GXRemoveQDTranslator
  269.             move.w              #$0240,D0
  270.             dc.w                $A832
  271.         EndM
  272.     ELSE
  273.         IMPORT_CFM_FUNCTION GXRemoveQDTranslator
  274.     ENDIF
  275.  
  276. ;
  277. ; extern gxShape GXConvertPICTToShape(PicHandle pict, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStretch, gxShape destination, gxTranslationStatistic *stats)
  278. ;
  279.     IF ¨ GENERATINGCFM THEN
  280.         Macro
  281.         _GXConvertPICTToShape
  282.             move.w              #$0241,D0
  283.             dc.w                $A832
  284.         EndM
  285.     ELSE
  286.         IMPORT_CFM_FUNCTION GXConvertPICTToShape
  287.     ENDIF
  288.  
  289. ;  Find the best GX style given a QD font and face. Called by the QD->GX translator 
  290. ;
  291. ; extern long GXConvertQDFont(gxStyle theStyle, long txFont, long txFace)
  292. ;
  293.     IF ¨ GENERATINGCFM THEN
  294.         Macro
  295.         _GXConvertQDFont
  296.             move.w              #$0242,D0
  297.             dc.w                $A832
  298.         EndM
  299.     ELSE
  300.         IMPORT_CFM_FUNCTION GXConvertQDFont
  301.     ENDIF
  302.  
  303. ;
  304. ; extern gxConvertQDFontUPP GXGetConvertQDFont(void )
  305. ;
  306.     IF ¨ GENERATINGCFM THEN
  307.         Macro
  308.         _GXGetConvertQDFont
  309.             move.w              #$0243,D0
  310.             dc.w                $A832
  311.         EndM
  312.     ELSE
  313.         IMPORT_CFM_FUNCTION GXGetConvertQDFont
  314.     ENDIF
  315.  
  316. ;
  317. ; extern void GXSetConvertQDFont(gxConvertQDFontUPP userFunction)
  318. ;
  319.     IF ¨ GENERATINGCFM THEN
  320.         Macro
  321.         _GXSetConvertQDFont
  322.             move.w              #$0244,D0
  323.             dc.w                $A832
  324.         EndM
  325.     ELSE
  326.         IMPORT_CFM_FUNCTION GXSetConvertQDFont
  327.     ENDIF
  328.  
  329. ;  ColorSync 2.0 interface related routines 
  330. ;
  331. ; extern void GXSetColorProfileReference(gxColorProfile profile, CMProfileRef reference)
  332. ;
  333.     IF ¨ GENERATINGCFM THEN
  334.         Macro
  335.         _GXSetColorProfileReference
  336.             move.w              #$0282,D0
  337.             dc.w                $A832
  338.         EndM
  339.     ELSE
  340.         IMPORT_CFM_FUNCTION GXSetColorProfileReference
  341.     ENDIF
  342.  
  343. ;
  344. ; extern CMProfileRef GXGetColorProfileReference(gxColorProfile profile)
  345. ;
  346.     IF ¨ GENERATINGCFM THEN
  347.         Macro
  348.         _GXGetColorProfileReference
  349.             move.w              #$0283,D0
  350.             dc.w                $A832
  351.         EndM
  352.     ELSE
  353.         IMPORT_CFM_FUNCTION GXGetColorProfileReference
  354.     ENDIF
  355.  
  356.     ENDIF
  357.     ENDIF ; __GXENVIRONMENT__ 
  358.  
  359.